package org.wattdepot.cli.command;

import static org.junit.Assert.assertEquals;
import java.util.ArrayList;
import java.util.List;
import org.junit.Test;
import org.wattdepot.cli.CommandLineInterface;


/**
 * Test that checks for valid output within the ListSensordataDayCommand class.
 * 
 * @author Anthony Xu & John Mack
 * 
 */
public class TestSensordataDay {

  /**
   * Test to see if SensordataDay class displays correct output.
   * 
   * @throws Exception NotAuthorizedException, ResourceNotFoundException, BadXmlException,
   * MiscClientException.
   */
  @Test
  public void testingSources() throws Exception {
    CommandLineInterface cli = new CommandLineInterface();
    List<String> commands = new ArrayList<String>();
    commands.add("dailysensordata");
    commands.add("SIM_KAHE_2");
    commands.add("day");
    commands.add("2009-10-31");


    String dayOutput = new ListSensordataDayCommand().doCommand(cli, commands);
    assertEquals("correct fuel output", "[Property [key=powerGenerated, value=5.5E7]]" +
        "OscarDataConverter2009-10-31T00:00:00.000-10:00", dayOutput);
  }

}
